package com.Guigu.AIchat.inter;

import com.Guigu.AIchat.domain.ChatMessage;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

// ... existing code ...
public interface AIChatRepository extends JpaRepository<ChatMessage, Long> {
    List<ChatMessage> findByUserIdOrderByTimestampDesc(Long userId);
}
// ... existing code ...